package com.purang.web.common;

import lombok.Getter;

import java.util.Random;

/**
 * 公共相应
 *
 * @author Zheming Liu
 * @version 1.0-RELEASE
 * @since 1.0-RELEASE
 */
@Getter
public enum CommonResponseCode implements BaseResponse {

    OK(200, "OK"),
    UNAUTHORIZED(401, "Unauthorized"),
    REQUEST_METHOD_ERROR(405, "Method Not Allowed"),
    SERVER_ERROR(500, "Internal Server Error");

    private static final long serialVersionUID = new Random(System.currentTimeMillis()).nextLong();

    private Integer code;

    private String message;

    CommonResponseCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
